Security News
Dutch National Police Disrupt Redline and Meta Malware Operations
Dutch National Police and FBI dismantle Redline and Meta infostealer malware-as-a-service operations in Operation Magnus, seizing servers and source code.
@walletconnect/types
Advanced tools
@walletconnect/types is a TypeScript package that provides type definitions for the WalletConnect protocol. It is used to ensure type safety and consistency when developing applications that integrate with WalletConnect.
Session Types
Defines the structure of a WalletConnect session, including details about the peer, permissions, and expiry.
import { SessionTypes } from '@walletconnect/types';
const session: SessionTypes.Created = {
topic: 'abc123',
relay: { protocol: 'waku' },
peer: { metadata: { name: 'Example DApp', description: 'An example decentralized application', url: 'https://example.com', icons: ['https://example.com/icon.png'] } },
permissions: { blockchain: { chains: ['eip155:1'] }, jsonrpc: { methods: ['eth_sendTransaction'] } },
expiry: 1234567890
};
Proposal Types
Defines the structure of a WalletConnect proposal, including details about the proposer and required namespaces.
import { ProposalTypes } from '@walletconnect/types';
const proposal: ProposalTypes.Struct = {
id: 1,
params: {
proposer: { publicKey: '0xabc123', metadata: { name: 'Example DApp', description: 'An example decentralized application', url: 'https://example.com', icons: ['https://example.com/icon.png'] } },
requiredNamespaces: { eip155: { methods: ['eth_sendTransaction'], chains: ['eip155:1'], events: ['accountsChanged'] } }
}
};
Error Types
Defines the structure of error types used in WalletConnect, including error codes and messages.
import { ErrorTypes } from '@walletconnect/types';
const error: ErrorTypes.Provider = {
code: 4001,
message: 'User rejected the request.'
};
web3.js is a collection of libraries that allow you to interact with a local or remote Ethereum node using HTTP, IPC, or WebSocket. It provides functionalities for interacting with smart contracts, sending transactions, and more. Unlike @walletconnect/types, which focuses on type definitions for WalletConnect, web3.js provides a comprehensive set of tools for Ethereum development.
ethers.js is a library for interacting with the Ethereum blockchain and its ecosystem. It provides utilities for sending transactions, interacting with smart contracts, and more. While @walletconnect/types provides type definitions for WalletConnect, ethers.js offers a full suite of tools for Ethereum development, including wallet management and contract interaction.
web3modal is a library that allows developers to easily integrate multiple wallet providers into their applications. It provides a modal for users to select their preferred wallet. While @walletconnect/types focuses on type definitions for WalletConnect, web3modal provides a user interface for connecting to various wallet providers, including WalletConnect.
Typescript Types for WalletConnect
FAQs
Typings for WalletConnect Protocol
The npm package @walletconnect/types receives a total of 468,408 weekly downloads. As such, @walletconnect/types popularity was classified as popular.
We found that @walletconnect/types demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 12 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Dutch National Police and FBI dismantle Redline and Meta infostealer malware-as-a-service operations in Operation Magnus, seizing servers and source code.
Research
Security News
Socket is tracking a new trend where malicious actors are now exploiting the popularity of LLM research to spread malware through seemingly useful open source packages.
Security News
Research
Noxia, a new dark web bulletproof host, offers dirt cheap servers for Python, Node.js, Go, and Rust, enabling cybercriminals to distribute malware and execute supply chain attacks.